import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/Login'
import Edit from '@/components/edit/Edit'
import ArticleContent from '@/components/articleContent/ArticleContent'
import Draft from '@/components/draft/Draft'


import editChildren from './editChildren'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path:'/edit',
      name:'Edit',
      component:Edit,
      children:[
        ...editChildren
      ]
    },
    {
      path:'/articleContent',
      name:'articleContent',
      component:ArticleContent
    },
    {
      path:'/draft',
      name:'draft',
      component:Draft
    }
  ]
})
